using System;
using UnityEngine.UI;

namespace HEFramework
{
    /// <summary>
    ///
    /// UI滑动条行为接口
    /// 
    /// ----------------------------------------
    /// 作者 hep
    /// 创建时间：2023-02-17 16:40:03
    /// ----------------------------------------
    /// </summary>
    public interface IUISliderBehaviour : IUIBehaviour
    {
        /// <summary>
        /// 滑动条
        /// </summary>
        Slider Slider { get; }

        /// <summary>
        /// 进入
        /// </summary>
        void OnEnter();

        /// <summary>
        /// 值变化
        /// </summary>
        void OnValue(int _value);

        /// <summary>
        /// 离开
        /// </summary>
        void OnExit();


        /// <summary>
        /// 注册事件回调
        /// </summary>
        /// <param name="_enter"></param>
        /// <param name="_value"></param>
        /// <param name="_exit"></param>
        IUISliderBehaviour RegisterEvent(Action _enter = null, Action<int> _value = null, Action _exit = null);

        /// <summary>
        /// 注册进入事件
        /// </summary>
        /// <param name="_callback"></param>
        IUISliderBehaviour RegisterEnterEvent(Action _callback);

        /// <summary>
        /// 注册值变化事件
        /// </summary>
        /// <param name="_callback"></param>
        IUISliderBehaviour RegisterOnValueEvent(Action<int> _callback);

        /// <summary>
        /// 注册离开事件
        /// </summary>
        /// <param name="_callback"></param>
        IUISliderBehaviour RegisterExitEvent(Action _callback);
    }
}